// // IntelliJ API Decompiler stub source generated from a class file
// // Implementation of methods is not available
//
//
import { BufferedSource } from "./BufferedSource";

// // Source.ts
export interface Source {
  _isGzip: boolean;
  set isGzip(value: boolean)

  Stream(callback: (chunk: Uint8Array, complete?:  boolean, error?: Error) => void)
  /**
   * 读取最多 byteCount 字节到 sink 中
   * @param sink 目标缓冲区
   * @param byteCount 要读取的字节数
   * @returns 实际读取的字节数，-1 表示流结束
   */
  read(sink: Uint8Array, byteCount: number): Promise<number>;
  readBytes(): Promise<Uint8Array>;
  readString(): Promise<string>;
  /**
   * 关闭源
   */
  close(): void;

  buffer(): BufferedSource

  skipAll()
}
